/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.figmania.controlador;

import br.figmania.modelo.Usuario;
import br.figmania.repositorio.Dao;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Henrique
 */
public class TimeControlador {
    
    private Dao repositorio = new Dao();
    
    public void buscarNoticiasDoMeuTime(HttpServletRequest request,HttpServletResponse response) throws IOException{
        
        HttpSession secao = request.getSession();
        Usuario usuario = (Usuario) secao.getAttribute("usuario");
        
        response.sendRedirect("https://www.google.com.br/search?hl=pt-BR&gl=br&tbm=nws&q="+ usuario.getTimes());       
        
        
    }
    
}
